import httpRequest from '@/utils/request'

// 获取部门数据
export const getDepartmentAPI = () => httpRequest({ url: '/company/department' })

// 获取部门负责人数据
export const getSimpletAPI = () => httpRequest({ url: '/sys/user/simple' })

// 添加子部门
export const addDepartmentAPI = (data) => httpRequest({ url: '/company/department', method: 'POST', data })

// 添加部门详情数据
export const getDepartmentDetailsAPI = (id) => httpRequest({ url: `/company/department/${id}` })

// 修改部门信息
export const changeDepartmentDetailsAPI = (data) => httpRequest({ url: `/company/department/${data.id}`, method: 'put', data })

// 添加部门详情数据
export const delDepartmentAPI = (id) => httpRequest({ url: `/company/department/${id}`, method: 'DELETE' })

